//extends 继承
class Person {
  constructor(name) {
    this.name = name;
  }
  say() {
    console.log(`hi my name is ${this.name}`);
  }
}
// extends 继承父类，super 指父类
class Student extends Person {
  constructor(name, number) {
    super(name);
    this.number = number;
  }
  hello() {
    super.say();
    console.log(`my school number is ${this.number}`);
  }
}
const s = new Student("tom", 100);
s.hello(); //hi my name is tom my school number is 100
